//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-

extends ../body

block content
  h2
    | #{approvalRequest.org}/#{approvalRequest.repoName}
    | &nbsp;
    small= approvalRequest.repoVisibility

  p.
    A user has requested a new repo in the #{approvalRequest.org} org.

  if approvalRequest.repoVisibility === 'private'
    p This request is for a private repo.
    p Per Microsoft policy, private GitHub repos are designated for projects going open source soon.

  p
    a(href=actionUrl, style='display:inline-block;background-color:#eee;font-size:18px;padding:12px') Review request

  h3 Request details

  table.technical(style='width:80%')
    thead
      tr
        th(colspan=2) Requested by
    tbody
      tr
        td
          p
            a(href='https://github.com/' + approvalRequest.ghu)= approvalRequest.ghu
        td= approvalRequest.email
    thead
      tr
        th(colspan=2) Repo information
    tbody
      tr
        td GitHub organization
        td= approvalRequest.org
      tr
        td Repository name
        td= approvalRequest.repoName
      if approvalRequest.repoDescription
        tr
          td Repo description
          td= approvalRequest.repoDescription
      tr
        td Initial visibility
        td= approvalRequest.repoVisibility === 'public' ? 'Public' : 'Private'
    if approvalRequest.justification
      thead
        tr
          th(colspan=2) Justification
        tr
          td(colspan=2)= approvalRequest.justification
    thead
      tr
        th(colspan=2) Permissions
      if approvalRequest.teamsCount
        tr
          td Authorized teams
          td= approvalRequest.teamsCount

  h4 Protect yourself from phishing
  p If you prefer not to click on email links, you can find this approval by:
  ul
    li Navigating to the open source repos site at #{reposSiteUrl}
    li View your alerts, or go to the <em>/approvals</em> URL
    li Review the request details
